import http from '@/utils/http'


export const reportAPI = ({objectId, userId, reportedUserId, flaggedContent, extraInfo, content, objectType}) =>
  http.post('/api/report', {
    objectId,
    userId,
    reportedUserId,
    objectType,
    content,
    extraInfo,
    flaggedContent,
  })

export const getReportListAPI = ({ pageNo, pageSize }) =>
  http.get('/sys/report/list', {
    params: { pageNo, pageSize }
  })

export const getReportCountAPI = () =>
  http.get('/sys/report/count')

export const rejectReport = (reportId, reason, extra) =>
  http.post('/sys/report/reject', {
    reportId,
    reason,
    extra
  })